/*************************************************************************
    > File Name: client.cpp
    > Author: Lancer
    > Mail: 18826075768@163.com
************************************************************************/

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

using namespace std;

int main(){
    pid_t pid;
    pid = fork();
    if(pid > 0){
        printf("in parent process, sleep for 5 seconds...zZ...\n");
        sleep(5);
        printf("after sleeping, and exit!\n");
    }
    else if(pid == 0){
        printf("in child process and exit\n");
        exit(0);
    }
    return 0;
}